import numpy as np
import matplotlib.pyplot as plt
# x:-10-10平均分为100个数
x = np.linspace(-10,10,100)

y1 = np.sin(x)**2
y2 = np.cos(x)**2
y3 = y1+y2
# 绘制折线图
plt.plot(x,y1)
plt.plot(x,y2)
plt.plot(x,y3)
# 显示图表
plt.show()
